<template>
  <basic-container :btnFlag=true>
    <div class="card-border">
      <card-header :header-data="headerData"></card-header>
      <div style="float: right;margin-right: 17px;margin-top: 52px;">
      </div>
      <div style="float: right;margin-right: 17px;margin-top: 52px;">
        <el-button type="primary" size="mini" @click="subjectLevyResult()">发起征求意见</el-button>
      </div>
      <div class="card-body">
        <avue-crud :data="subjectListData"
                   :option="tableoption"
                   :page="page"
                   class="avuecrud">
          <template slot-scope="scope" slot="menu">
            <div class="menu-title" @click.stop="subjectDetail(scope.row,scope.index)">
              <i class="iconfont iconview icon-primary"></i>
              <p class="menu-title-text">查看</p>
            </div>
          </template>
        </avue-crud>
      </div>
    </div>
  </basic-container>
</template>

<script>
  import {getSubjectDeptList, addSubjectReport} from "@/api/subject";
  import {Subject_DIC} from '@/const/dict'
  import basisfile from "@/mixins/basisfile";

  export default {
    name: "subjectReportList",
    mixins: [basisfile],
    created() {
    },
    data() {
      return {
        headerData: {
          title: '征求意见'
        },
        subjectListData: [{
          achievementId: 431,
          achievementNo: '大气污染防止"十三五"规划',
          achievementTitle: "大气污染防止\"十三五\"规划",
          createNickname: "省发改委规划管理员",
          createTime: "环保厅",
          createUserId: 131079,
          createUsername: "ghadmin.fgw",
          description: "0002",
          endDate: null,
          isDelete: false,
          state: "征求中",
          subjectId: 2,
          title: "0002",
          updateNickname: null,
          updateTime: null,
          updateUserId: null,
          updateUsername: null
        },
          {
            achievementId: 431,
            achievementNo: '通用航空"十三五"发展规划',
            achievementTitle: "通用航空\"十三五\"发展规划",
            createNickname: "省发改委规划管理员",
            createTime: "省发改委",
            createUserId: 131079,
            createUsername: "ghadmin.fgw",
            description: "0002",
            endDate: null,
            isDelete: false,
            state: "已反馈",
            subjectId: 2,
            title: "0002",
            updateNickname: null,
            updateTime: null,
            updateUserId: null,
            updateUsername: null
          }],
        page: {
          total: 0, // 总页数
          currentPage: 1, // 当前页数
          pageSize: 10 // 每页显示多少条
        },
        tableoption: {
          page: true,
          menuWidth: 140,
          addBtn: false,
          editBtn: false,
          addRowBtn: false,
          indexLabel: "序号",
          index: true,
          indexWidth:70,
          cellBtn: false,
          delBtn: false,
          columnBtn: false,
          refreshBtn: false,
          filterBtn: false,
          searchBtn: false,
          keyId: "id",
          column: [
            {
              label: "规划名称",
              width: 300,
              prop: "achievementTitle",
              cell: true,
              search: true,
            },
            {
              label: "征求意见名称",
              width: 300,
              prop: "achievementNo",
              cell: true,
            },
            {
              label: "征求部门",
              width: 120,
              prop: "createTime",
              cell: true
            },
            {
              label: "状态",
              width: 100,
              prop: "state",
              cell: true
            },
          ]
        },
        tableLoading: false,
        dialogVisible: false,
        projectForm: {
          basisFileId: '',
          fileId: '',
          subjectId: '',
        },
      }
    },
    methods: {
      // 课题详情跳转
      subjectDetail(row) {
        let src = `/solicitOpinion/detail/${row.subjectId}`;
        this.$router.push({
          path: src
        })
      },
      subjectLevyResult() {
        let src = `/opinionCollection/add/${row.subjectId}`;
        this.$router.push({
          path: src
        })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .card-body {
    padding: 10px;
    min-height: 400px;
  }
</style>


